import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.*;

public class properties {

	static Properties props = new Properties();
	
	static int Port;
	
	public static int getPort() {
		return Port;
	}

	static Hashtable MultiHomeDirs = new Hashtable();

	public static Hashtable getMultiHomeDirs() {
		return MultiHomeDirs;
	}
	
	public static void Init()
	{
		try {
			FileInputStream propInFile = new FileInputStream("config.txt");
			
			props.load(propInFile);
			
			Port = Integer.parseInt(props.getProperty("port"));
			
			int i = 0;
			
			while(props.getProperty("dir(" + i + ")") != null)
			{
				String []keyValue = props.getProperty("dir(" + i + ")").split(";");
				MultiHomeDirs.put(keyValue[0], keyValue[1]);
				i++;
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
	
}
